Dynamic Drive DHTML code library!
Dynamicdrive.com


.
spacer.gif (807 bytes)
.

Menu

Search DD
Recommend DD
Email offers
DHTML books
Advertising
Contact

Featured Script
Pop-it menu 

Pop-it allows you to associate a drop-down menu with regular links on your page!
.

Partners

JavaScript Kit
.

Link to DD

Do you use scripts from Dynamic Drive? Please give something back by linking to us...
.
spacer.gif (807 bytes)

Home Small4.gif (1046 bytes) Mouse Trail effects Small4.gif (1046 bytes) Here

Roaming Cursor All

Credits: (00/07/24)
Name: Kurt Grigg
Homepage: Homepage

Notes: Modified by Dynamic Drive to display only one type of cursor

Description: Display a second, "roaming" cursor on your page with this fun animation script. An image resembling the mouse cursor wonders around the screen, rendering an amusing spectacle. The image is customizable, so a cursor is certainly not the only thing you can instruct to roam. DHTML programmers, examine the source to learn about the coding techniques involved in creating a random path for the moving image.

Demo: Observe closely the page...


Directions Developer's View

Step 1: Insert the below inside the <BODY> section of the page:


Step 2: Choose one of the following four images to display as the roaming cursor, and save the image by right clicking it, and selecting "Save As".

cursor.gif (132 bytes) cursor2.gif (155 bytes) cursor3.gif (151 bytes) cursor4.gif (155 bytes)

The third cursor may not be suitable for all sites!

Note: Be sure to configure the top variable inside code of Step 1 above to correctly reference the image used.

Technical Note

This script accesses the BODY onload event (window.onload). If you have another script on your page that does the same, one of them will not run. Click here for information on getting both scripts to work simultaneously.

Recommend Us!
-If you like Dynamic Drive, please recommend us to a friend...

Merchant Select
The #1 E-Commerce directory. Visit Merchant Select to find resources  for your online business!

Legend
All- Script works with Netscape 4 AND Internet Explorer 4+
NS- Indicates script works with Netscape 4 (NOT NS 6 yet)
IE- Indicates script works with Internet Explorer 4 and above
IE5- Indicates script works with Internet Explorer 5 and above
NS6!- Temporary index set up on script category pages to indicate script works in NS6


Copyright © 1998-2003 Dynamic Drive. Please read Terms Of Use here before using any of the scripts.